Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The old pairing file contains the
WiFiMACAddressfield, allowing mDNS devices to find their paired pairing file based on the MAC address. However, the new RpPairingFile currently does not have a relevant field that allows mDNS devices to find their paired pairing file. The_remotepairing._tcpservice only broadcasts the identifier and authTag data:This PR adds an additional
alt_irkfield to the RpPairingFile to verify theidentifierandauthTag, achieving the same functionality. The verification algorithm is referenced as follows:https://github.com/frida/frida-core/blob/main/src/fruity/pairing.vala#L1441C23-L1469
Approach
Add a small OPACK decoder so the pair-record save response can be parsed in-process, then validate the required peer fields before promoting them into a
PeerDevicemodel. Persistalt_irkinRpPairingFile.PeerDeviceuse SipHash to validate remotepairingauthTagvalues, while keeping the public API focused on the validated peer model instead of raw TLV parsing helpers.How it works
RemotePairingClient::pairnow parses the returnedInfoTLV into a validatedPeerDeviceand copiesalt_irkintoRpPairingFile.RpPairingFilenow serializes and deserializesalt_irk.PeerDeviceexposesvalidate_auth_tagfor remotepairing service matching, and enablessiphasherunder theremote_pairingfeature. The remote pairing module also adds OPACK decoding and TLV helpers for reading the peer info payload, plus unit tests that cover required peer fields and TLV parsing.Validation:
Links